from neo4j import GraphDatabase

driver = GraphDatabase.driver(
    "bolt://localhost:7687",
    auth=("neo4j", "12345678"),
    encrypted=False,  # 设置是否加密
    max_connection_lifetime=3600,  # 设置连接的最长存活时间
    max_connection_pool_size=10,  # 最大连接数
)

# 创建会话，执行cypher语句
with driver.session() as session:
    result = session.run("RETURN 1")
    # <neo4j._sync.work.result.Result
    # print(result)
    # <Record 1=1>
    # print(result.single())
    # print(result.single()[0])
    print(result.single()["1"])
    # data就是转成字典
    # print(result.data())
